package com.shujujiegou.二叉树.二叉树的基本实现;

import lombok.Data;
/**
 * 二叉树的节点类
 */
@Data
public class Node {
    private Integer data;
    private Node leftChild;
    private Node rightChild;
    private boolean isDelete;

    public Node(int data) {
        this.data = data;
        this.leftChild = null;
        this.rightChild = null;
        this.isDelete = false;
    }

    public void display() {
        if(!this.isDelete) {
            System.out.println(this.data + " ");
        }
    }
}
